<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        if (! Schema::hasColumn('sellers', 'type')) {
            Schema::table('sellers', function (Blueprint $table) {
                $table->enum('type', ['company', 'personal'])->comment('类型（企业/个人）');
                $table->string('id_card', 256)->default('')->comment('身份证照片/营业执照照片');
                $table->string('id_number', 256)->default('')->comment('身份证号/税号');
            });
        }
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
    }
};
